import request from '@/utils/request'

export default {
    //根据ID查询讲师信息
    getTeacherInfo(id) {
      return request({
        url: `/eduservice/teacher/${id}`,
        method: 'get'
      })
    },
    //分页条件查询讲师列表
    getTeacherListPage(current, limit,teacherQuery) {
      return request({
        url: `/eduservice/teacher/pageListCondition/${current}/${limit}`,
        method: 'post',
        data: teacherQuery
      })
    },
    getTeacherList() {
      return request({
          url: '/eduservice/teacher',
          method: 'get'
        })
    },
    //删除讲师
    deleteTeacherById(id){
      return request({
        url: `/eduservice/teacher/${id}`,
        method: 'delete'
      })
    },
    //添加讲师
    addTeacher(teacher) {
      return request({
          url: `/eduservice/teacher`,
          method: 'post',
          data: teacher
      })
    },
    //修改讲师信息
    updateTeacherInfo(teacher) {
      return request({
        url: `/eduservice/teacher`,
        method: 'put',
        data: teacher
    })
    }
}